﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Text;

namespace Tizer.Core.Repository
{
    /// <summary>
    /// Хранилище заказов
    /// </summary>
    public class OrderRepository : BaseRepository<Order>
    {
        public OrderRepository(ObjectContext context)
            : base(context)
        {
        }

        public OrderRepository()
        {
        }

        /// <summary>
        /// Получить сущность по Id
        /// </summary>
        /// <returns>Сущность</returns>
        public Order GetById(int id)
        {
            return ObjectSet.SingleOrDefault(e => e.ID == id);
        }
    }
}
